cmake_minimum_required(VERSION 3.4.1)

# 设置库名称和类型
add_library(serial_port SHARED SerialPort.c)

# 查找 log 库
find_library(log-lib log)

# 链接库
target_link_libraries(serial_port ${log-lib})